package com.shenma2009.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 军哥
 * @version 1.0
 * @description: IndexController
 * @date 2023/5/6 9:28
 */

@RestController
@Slf4j
@RequestMapping(value = "/index")
public class IndexController {

    @Value("${server.port}")
    private String serverPort;

    @GetMapping(value = "/hello")
    public String hello() {
        String msg = "server:" + serverPort;
        log.info(msg);

        return msg;
    }

}
